small calculation fixes