fix bugs and edgecalc styling