Small fixes and Java Native Agent debug hack