fixed code to run init script