sets constant if not set and fixes #328

clears the undefined constant notice