Fix #214 by adding check if index is closed, before adding to alias