bug with changing elements