initial fix. Now actually works