hopefully fix issue 6 and issue 7