Fix code for local testing