fix bug in background decomposition