fixed determine context from url