Plugin: Fix IndexError

Fixes #6