fix strict mode bugs