better fix for the crash
fix consolidate