fixed wrong response & type check