fix bug caused by having a new schema instance on every render