Minior modification for eventloop -Yuan