Fixes: #1779 Fixes a mistake in samba code