Fix migrations
Fixes #3
Fixes #4