fixes on bugs found by irene