Fixed crash in case location was not defined
Implemented picture viewer