Fixes for #284