basic bug fixes