Fixed offset=0 and ->result not being defined