fixed #218, some small hacks for lager support