Anne Hathaway Narrowly Avoids a Wardrobe Malfunction on Film Set