fix double printing