Bug fixes for bug fix