fix code pieces