fix small bug in infinity scroll directive