fixed selector bug for going outside of bounds. general clean up