failed to fix recursive javascript bugs