Some minor changes, also fixed a warning from the compiler