fix code positions