Change result var to serializable one and fixed try and loop