Fixed bugs

PHP 5.4 has no finally