fix bug in openings