added a few fixes