fix for setTimeout