TODO: Fix collect functionality.