fix tests and decode body