Fixes according to @codebrickie's comments