Bug fix. Detection of pass name moved to