migration bugs fixed