update for fixing bug in generation of name_lastpart