bug fix; integration test works