additional fixes from last commit