Fix for #123

Fixes #123

This fix only affects users with PHP 5.5 or newer. With lower versions, you cannot reproduce error in the testcase you see in #123.