Fix scrollspy losing track after adding photos

also some comments