added flags broke the dump function in some cases