Updated Core to handle json error