Moving cursor.close() into finally{}.

This time at the right spot.