Corrected a bug in the position on screen evaluation function