Now compatible with PHP 5.4 + bugfix