fixes to code