Fix bug with asJson