Fixes for #474