added ezra's fix. works sometimes