Fix crash handling ?key= query parameter, and implement ?keys=

Fixes #260