fixed undefined constant issues