Fixing bugs in Phalcon\Db