Fix bug where getPdo() return null before any query was executed.