Fix init and dependencies

Fixed bugs:
https://bugs.gentoo.org/show_bug.cgi?id=477350
https://bugs.gentoo.org/show_bug.cgi?id=478240
https://bugs.gentoo.org/show_bug.cgi?id=478142