Added a check for footer element