Fix logic error in fix for #151