workaround for seg fault