App gallery backend code fix