Fixed get_mut deprecation warnings.
Solution to 40.
Added test for 40.