Fixed overwriting last entry with currently selected certificate