Fixes after @svenfuchs' suggestions