Partial fix #45, and attempt fix #60