Added checks for doubled values