Fix javascript error when there's no observations