Fixed cursor bug