Fixed mis-type for magnitude (was int, should be float).