fixes in init script functions