Fix getDeepBounds method