fixes based on @ndereli's suggestions