Thanks..I've reviewed the code and while I know why you're getting this problem, I'm unable to find a solution.
For some reason (and I haven't a clue as to why) your aliases aren't being recognized. You can test/check this yourself by using //echo -a $isalias(<alias name>)
If the alias exists (doesn't work with local aliases, since they can only be called from within the script), then it returns $true..otherwise $false
When I checked the aliases listed in your code, they returned $false, inspite of the fact that I can see the alias definition.
Sorry I can't be of more help.