MID-1903 - fixing few issues/adding some improvements
Merge branch 'master' of https://github.com/Evolveum/midpoint