bug when using auto schema discovery