started fixing PDO bugs