fix assertion bug

causing travis to fail