Fixed bug in routing, updated calc