Fix the working code I threw out in the last commit