added better handler resolution