Bugfixes on opening Gallery