Fixing bug on considering gradient backgrounds as images