bug fixes from prtential bug list