fixed problem in the mode functions -- same root as the bimodality functionn (the random occ frame)