added background fix for large dimensions