Cannot fetch form_state['values'] of text field from dynamically created Ajax fields
You have used $form_state['num_names'] instead of $form_state['values']['num_names'].

Please try to update and see.