Fix segments classes bug