Fixed bug in selection model