Fix migrations and plotting