added function to disable the cursor