Fixed all the crashes finally!