Fix bug where rating system did not work on gallery page