fix layout media bug