resolved segf issue