Remove needless code

- Remove duplicated code