Fixes a bug with Chrome crahsing when because of an undeclared function