Gallery controller edit fix