Solve 2 bugs