A couple of fixes related to #31