fix bugs noted by taylor