fix bug with repeating observations