Study shows what can cost middle-aged women their careers