merged #165 to 0.42