Minor bug fixes

Fix for an issue caused by text in if statements where some
equalities only had one equals sign