fix bugs in camera device