Fix bug in independent variable selection

Closes #22