don't attach event handlers before DOM is ready. #278