Fix attachCallbacks
Merge pull request #2 from Tomkinss/master

Fix attachCallbacks