fixed destructor memory exceptions in scanmodel