Fixed #2. Now redirects back to gallery every next or previous.