Replacing toURL() for nativeURL (seems to fix the bug..)