fixed user replacement, closes #331