Fixed the cursor problem