some lua test code + some java fixes