fix some things as suggested by JanL