fix gallery and image modules
#1217