handle resource urls better