some small fixes for bugs found in prod