fix error in result storing