Fix fot #6363

https://github.com/zendframework/zf2/issues/6363