Bug 230, fix compilation issues and wrong static assertions