Fix bug with front camera failing to capture photos.