Bug fixes during first test