Fixed build error in linux and mac