Fixed a bug with deleting features caused by commit ac3c5d8b058266662d034d903990a01680c2f57e