Fixed couple of issues where the target branch/ref was being ignored