fixed strange previously undetected bug