Fixing cursor issue