Fixed bug with mass assignments