fixed mask with alpha channels to work properly