Fixed select error

Fixed #345