Change branch to ref
Fix validation issues