Fixed #1, scope detection was wrong.