Fixed "$filter is undefined" error.