Looping works but weird bug with shift amount > 10