Bugfix in migration + fixed task tests