fixed block issue in java. now need to look at the JS