fixed bug in demag further