Ooops. Fix ugly code