Fixed issue with vectors not being cleared