event-handler.sh: minor bug fix