BugFix in condition

Please merge the fix. 

BTW: Maybe it's better to use `===` or `!==` in conditions instead of `==` and `!=`.

See: 
http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons