Minor fixes for android compatibility.