fixes bug in get_avg_price
makes changes to the max and min_sleep time possible