Merge pull request #2 from Lughino/master

Fix error listener
Fix missing var in index