...
added 3 segment crash prevention