precedence selection bug fixed