Hacky attempt at making it work...
and it does! (sometimes... mostly...)