Fix demands function