some fixes to compile on of v0.8