few bug fixes
merged