fix panic on sql error in Select