clean up params before update