fixes operation over run in certain scenarios