fix sengment fault