a little wrong in the upper storey

slightly mad
(the reference is to the person’s head)