Then you probably have too many onions or they are not flat.  Be sure to follow the amount of onions called for in the recipe - 1 small, 1/2 medium or 1/4 of a large onion.  Be sure to keep them in slices and lay them flat as you put them in the bowl.  And make the marinade in a separate bowl.  It's important not to have them sticking up out of the oil, because they will go bad.