Fixed casting error and added ability to push from different branches