fixing stage1 script errors