Fixes related to #390