Few fixes:

* Take care of special characters (fixes #406)
* Don't try to select a non existing object (fixes #411)