Fixes bugs with messed up paths and routes