some races condition fixed