fix bug with multiple components