Fix bug with key and path being switched around in delegate call