fix bug described in #882

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>