Merging 0.5 fixes into master