Several bug fixes after modifications to the filters and return