Fixed Pundit and remaining issues