Fix of boundaries