fix the json marshal from the database lib