Fix errors for running stack