Resolve problem with gallery