bug fixes before i forget