fixed issue with alpha detection