Fix error: call to 'abs' is ambiguous