Fix exception to do with clicking outside rows in library view