Added check for valid id