Merging fixes for m5