Fix JSON marshal error that led to crash