restored functionality (at least I think this is how it used to work)