Shape delete flaw removed

After a shape is deleted, it gets removed from main array also
Merge remote-tracking branch 'origin/master' into gh-pages