fixes #15
Improved sync of photos (#6 and #15).