Fixed small error in createFrame().