fix a number of code issues