Fix in image listing (private/group); Changes and fixes after database refactoring