Fixed 500 issue in delete floder api.