Fixing output location bug