Fixed a bug where we were hitting the database unnecessarily.