fix: crash on arrangement and deleting reroutes

probably also happened when deleting frames. was only broken in new
builds