fixed bugs with sparse .* not functioning for some * cases