My fixes to #303

ping @dantleech