fixed selection of rotated boxes