fixed bug in calculate_gradient_single_batch where instanced with only one word failed to give the correct gradient