fix components functionality, refactoring had introduced a bug with application of component swap