specific if statements

made the if statements more specific in order to avoid all issues