Fixed misc bugs in simple-java and base