more bug fixing and bug discovery