Fixed bug with camera crash