few fixes/improvements