Fixes based on feedback by @sgilda