giant if statement to stop doors closing on large units.