fixed level detection error