Pad the frames correctly