implementation bug fixes