Added security against calculating when pool is empty