fixed data model bugs from the demo version