Fix content flash, improve error message