band-aided several bugs around script injection
I really need to completely redo that piece