More bug fixes and backwards compatibility fixes