fix issues on video/photo capture