Handling for empty children. Divide by 0 error