Fix JavaScript layout