Solved the problem for drawing the selection area