Fix redundant code