optimizing cursor_rect behavior