implement [gs]etFeature and workaround unexplained off-by-one error