fixade en potientiell multi-thread problem med runtime event queue