merge from luckval fork