made several changes , I don't remember what I done, see diff if you need.