!big fix layer deletion and selection manager