fetchone() bug fix