a temporary solution for #46, fixes #45, update for #47
update for #47 AGAIN