Fix invalid assignment to const