Replaced grep to egrep to correctly handle unstable tags.