fixed compile error: a constant was used before being defined