Removed extra session_check since it made the site stop working.