Fix code style for methodsg