Fixed some issues with assignment vs comparison

Found with http://refactorcop.r14.railsrumble.com/