i think this missing return is causing count to sometimes not work