added bounds checking to feature.sync