1. handling null values in migration.
2. some fixes.