code fix

found some small errors in the code, so went through and fixed them.