Fix the bug in gallery Admin