potential seg fault fix for linux users