Changed something to fix crashes