fixing problem with commit message being assigned to wrong variable