fixing segault maybe