fixed 10 bugs