Fix bottomBoundary not count correctly