Fixed cursor not being close