fix bugs in instance FromJSON Goal