Hopefully fixed really weird crashing bug