Fixed sidebar JS malfunction