Correting function create branch in js file