Replaced eval with safe window[]