Debug logs + fix in segment