fixed minor undefines bug