fix for fromJSON with options