Bug in removing elements fixed.