fixed some segment stuff