add assert; fixes #3092