fix ham crash