Various bug fixes for compilation