some bug fix.