bug fix phase 1