a few fixes
merged a few fixes