fixed some sidebar code
merge