Add the beans after you've softened the vegetables. Simmer the beans gently over low to medium heat rather than boiling vigorously. This will help prevent them from becoming overly mushy.