Fixed callback code so that more than one space is supported
Merge pull request #10 from tito/fix_callbacks_and_multiple_spaces

Fix callbacks and multiple spaces