Some fixes for startup script