added fix from Peter A