Changed string comparison to use equals(), as per sonar