Fix that silliness.
Hmm... try moving createViewer after.