added modal for ajax & fixed a bug when header values array is empty