bug fix and upgrade to v1.2.7