fixed meld detection (among other things)