Some minor changes + a big one thanks to @buhtum