Added black bar detection