fix exception handling in look ahead