fixed minor bugs such as initialized new photo when no supposed to (original for testing purpose)