fixed code error for component