attempt to fix seg fault