Solve issues with generated codes