Improved priority select
Fix CRLF