Fix the bug in no migrate for Galleries