Build upon A.Maloteaux's SMB fixes