fixed errors with constant.js