cannot add NoneType to Long bug fix