Fixing undeclared variables and other error reported by Zephir [ci skip]