Fixed bugs, works with newest nightlies