fixed verifying undefined variables and types