Sparse fixes

Hi! 
Some sparse fixes. Please apply.