fixed bug with elements on switching between slides