fixes to fragments concatentation optimizer