Caching/get selector bug fix

Fixes #78

Included new integration test that failed and then passes after fix