fixed compilation errors (thx @rolk)