Retain selection after installation error (#512)

Closes #512 
Closes #435