fixed migrate
better handling json