fix diagram problem