fixes based on hadfls comments