Fix Bug #1022

https://github.com/phalcon/cphalcon/issues/1022