Fix branch resolving in deployment script