Fixed bug where consts would be reported as errors