Improved angle detection