some fixes and an init script