fixed a bug where code broke if there were no users accessible.