Fix bugs caused by return code 201 from 200