Bug fixes

Various bug fixes to the core and google files