Fixed bug and refactored alias_in.