small bug in relative error fixed