Fix for crashing migrations

Added missing reference and fixed datatypes of crashing migrations.