Fix before_filter bug