Fixed bug in camera initialization