Remove undefined behaviour in selective implementation
Merge pull request #1 from mgaudet/master

Remove undefined behaviour in selective implementation