Fixes possible crash when typing in a destination.