bug fix and bootstrap