Fixed bugs after adding Dan's css