Fixed top & bottom functions for aabbs.