fixed compilation errors, missing some functions