small bug fix, new bug found but not corrected yet, works partially