Master hotfix

I'm sorry, some classes aren't tested and did not appear in phpunit but on my dev enviromnet the current build fails. This PR restores functionality. I'll add tests in a separate PR but you should merge this one asap!