fixed slight error in num_proc, and java serial gc