Changed comparison to use equals