temporary solution to a seg fault