Use right var in if statement for checking prs