Fixed programming errors

 * String comparisons with ==-operator
 * equals()  with incompatible types

Signed-off-by: Janne Kujanpää <jikuja@iki.fi>