Fixed a bug and PDO calls (exec --> query)  #137