fixed some things so it doesn't crash
More stuff