init script bugfixes