repaired gson implementation