fix resource pre migration