Fix for NoneType.