simplify to fix crashes