Why close cursor here when it's closed 2 lines after?