Bug fixes on camera and exeption handling