fixed compile error in code