startup scripts fixes & other fixes