Need to fix problem in Gallery controller