Fixed execution of wrong script on startup

Also fixed a conditional error