fixed init so it loads scripts properly