Fixed bug in M-Step