An integrated model for fire sales and default contagion