Added solution checking

Also fixed a bug when using a photo from the camera