bug fix and leaf droping on pages