Retain selection after installation error (#512)

Closes #512