fixed tostring operation and cyclic dependencies