fix bug where worker gets collected on index page simulation
 - also use types array between the worker and the page to try to improve performance.