Detection bugfix