corrects bugs in previous commit