bunch of random fixes
fixed equality comparison