fixed some path/config issues

important issue fixing to make it work under every path/sub-path uri hamster circumstances