compile error when single threading