Fixed lastInsertId() bug, mistakenly called from PDOStatement