Fixes to ensure HTML 5 compatibility