some fixing for javascript diagrams