fixing handler definition parsing