Fix javascript and viewport