Workaround for TypeError: 'NoneType' object is not callable.