Fixed deletion of aliases. Resolves #490.