many various fixes which will still need to be fixed