fix window handler issue, starting to under stand React model better