fixes on routing and scripts