Fixed default wait time and made it configurable.