forgot to close cursor