fixed coding errors in the final exam event