Better types detection