Fixed "Gallery2" module's queries