more basic bug fixes