merge data (fix #519)
some cleanup