Fix things that #48 (NAN) broke