fixed busy loop