Fixed cursor positioning after screen refresh.