bug fix, still small bugs to find