Added necessary checks for snap cast condition.