fix crash when launching camera