fix wrong action in case statement