fix undefined constant errors