fixed run functionality