whoops, fixed a bug found by @Darkblizer