Fixed definiton check in parser