Various fixes by Sachin (1/2)