GlobalConst and few more bug fixes