4.2 051

Merge changes concerning 4.2-051 into master
expand_mode is added twice here