Fix candidate panel rendered to out of screen problem

Candidate panel is rendered out of screen when the candidate panel is rendered close to the screen edge. Expanding Box should fix the problem.