more bug fixes so that things work better