Fixes TypeError