Fixed migration bugs including sub fields and conditional logic

Signed-off-by: Elliot Condon <e@elliotcondon.com>