Fixed create task which was completely buggy since last rewrite.