Fixing bugs and adding deadline_for_user(...)