fixed memory out of bounds and some gui updates