Bug fixes encountered while testing