Fixed waitForDocker() method

Fixed waitForDocker() method