Replace == operator and other minor fix

* replaced == operator with equality operator;
* other minor fix.