adding image to route and fix some bugs.