Fixes to startup script