some bugs found and fixed

no issue to ref here as they were on the fly fixes