Added in thread sleeping.