Improve behat wait method