Fixed bugs in my implementation of pick and omit