Fixed bug for checking bos of surface when unref