Fixes constants names and check for existence of  var fr #15