Improved alias check

Improved alias check