fixes based on @gregcaporaso's feedback