Fixed resize bug when embedded.