Fix select bug

Hey! Here is fix for issue #1