Fixed integration tests

(mostly)