Some tweaks from Bob Evans