some corrections to regexp