Fixed error magitude. Now using 1 error variable for all 3 axis