fix crashes i assume