Bugfixing

This commit provides some bugfixes, like the photo
viewer pinch-to-zoom bug.