1. fix a typo
2. ensure proper http status being returned