fix onfinish