Fixed to work (almost)