Fixes two bugs in first migration