fix compile error

msvc didn't have a problem with the previous code.