Fixed problem with struct. Not best solution, need to update.