bug fix in calling background definition function