Fixed GUI so that it follows the layer setup correctly