fix photo loop and scroll length