fix bug resolving aliases