fixed busy waiting