fixed camera.reset() bug; some variable definitions added