Fixed mono-stage issue and changed JSON encoding method