Added layer parameter to bg load.