fixes some problems