Fix #549
merged master