hanges to prevent crashes