strange java bug averted