fixed bug in url to accept flat url