Hotfix/various fixes

https://github.com/Maks3w/zf2/commit/6bec8747c5f05e8fc72bcf1ea414027fdca4a1a4 is the most important patch in this pr