minor fixes from Jpsi analysis branch by geonmo