Added exceptions and headend handling