bug fixes to build