WIP on fixing nil cursor bug