fixed quad tree detection