Fixed issues discussed previously

Dear Sir/Madam,

Can one gatekeeper review this patch?

Regards