Test fixing and one bug fix