Fixing random issues I've found while testing.