bugfix: introcuced a proper method to delete the mass (fixes a memory leak, which leads to a crash in windows)