Fixed some MD problems