Remove unnecessary nils