fixed cacheing of some values (using code from Samba)