Fix code arrangement