Fixing code to suit new Behat update (that is causing errors with returns and ifs)