Fixed 406 HTTP Status not being returned correctly