fixed error on detect schema