init script and bugfixes