Fixed bad mass replace

Fixed bad mass replace

issue #24