Window.onload no longer reliable event to run initialization, at least documentations and people from stackoverflow say so. Silly me. I was so blind.