bug fix and stuff