fixed bug reported by Irina K

Also tried to fix LBP detector regression in quality (probably it does not help but still ...)