Corrected slot assignment

The old code could never work due to several small bugs:

* It checked only the first character
* It tried to match a string against a regexp, which will always be false
* It tried to match the instance id, which is not a simple integer, but a string in a hexadecimal format
* It assigned the bracket, not the actual instance id

Aside from that the code was very easy to understand. Keep working! ;)