fixed PDO bugs.