use undefined instead of null in order to avoid nw crash