bug fix for #216 always set mode