Removes generator expression as it causes problems when trying to consume it more than once.