Fix JS when element is undefined
Fix bug when time block is shown for protected status