Fix crash on right clicking image. Closes #34.