fixed compile error due to non-defined variable