bug fixes,save completed status to db