Fixed testing string values (used ".equals" instead of "==").