Better error calculation