Fixes thanks to reddit comments