fixed minor bug in onjoin, onpart