Fix gallery in editmode