Quick bugfix

Didn't have time to test this, should work, tho.