fixed some discovered issues