Fix for the out of room effect if only counting object width and height