Fixed mag calc and added agency