fixed gallery crash when accessed from menu