Batlab build improvements
Merge branch '4.2'