update and a few fixes