fixed spinning bug