Fixing some minor bugs

- bug 4417
- bug 4442
- bug 4448