fixed kswap thread bugs