fix balanced key