proposed fix for #301

This is a first step towards fixing aphyr/riemann#301 with updated tests