fixed and refactored font protection