Finally fix gallery problems. (hacky)