4 Matic Problem on 2009 Mercedes E350

The 4 Matic shifting mode does not work occasionally.  Additionally, after stopping and trying to change gears manually either forward or reverse, I need to put the shifter in park mode before the transmission will engage.  What could the problem be?  I have already checked the battery and the transmission fluid and they are okay.