Fix several smaller issues