Fixed issue where None would be returned