Fixed non-perfect root minus integer issue