removed unused code
fixed bug with navigation on segment control