added workaround for some weired compiler bugs.