error fixes to previous commit