Fixes memory issue caused by dispatcher