start up script bugs corrected