Bug fixes during testing