add backward compatibility to gallery 3.0.9