fixing magnitude output