fixed compile bug in some systems