fixed pointer to struct passed by ref bug.