Expanding boxes going out of frame when expanding to type in them