fixed some idle-related bugs