Fixed constant detection issue