Fixed openCamera logic