Fix the issue of not replacing correct student after results has been entered