Fixes thanks to reddit