minor changes
fixed bug with destroying first element.