fixed a bug in the core and response class