Fix two bugs.