Fix query param parsing so it doesn't blow up. Closes #42