FIX: some code changes