fixed body undefined bug