fix crash when we get illogical values

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