fix DOMContentLoaded listener