Exposing and correcting the gender bias in image captioning datasets and models