use Object.toString() instead of window.toString() 

Ref #214. Forgotten two calls of window.toString().