fix errors about changing table & etc