Fixed multiple delete-bugs cuz debug.write