Fixing bugs with Java/Javascript conversion.