fixes. todo: look why detection wrong